package blogs.eidos.cloud.framework.shiro.vo;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.Version;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import net.bigdata.cloud.framework.common.entity.BaseEntity;

import java.util.List;

/**
 * @author ： Eidos
 * @date ：Created in 2021/4/14
 * @description：
 * @modified By：
 * @version: 1.0
 */

@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "PermissionTreeVo")
public class PermissionTreeVo extends BaseEntity {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("ID")
    @TableId(value = "id")
    private Long id;

    @ApiModelProperty("父id")
    private Long parentId;

    @ApiModelProperty("权限名称")
    private String name;

    @ApiModelProperty("唯一编码")
    private String code;

    @ApiModelProperty("路径")
    private String url;

    @ApiModelProperty("图标")
    private String icon;

    @ApiModelProperty("类型，1：菜单，2：按钮")
    private Integer type;

    @ApiModelProperty("标签图标")
    private String tagIcon;

    @ApiModelProperty("ios路由地址")
    private String iosRouteUrl;

    @ApiModelProperty("安卓路由地址")
    private String androidRouteUrl;

    @ApiModelProperty("层级")
    private Integer level;

    @ApiModelProperty("层级Code（父级level，本身id）")
    private String levelCode;

    @ApiModelProperty("状态，0：禁用，1：启用")
    private Integer state;

    @ApiModelProperty("是否只读：1-只读；2-可编辑")
    private Integer readonly;

    @ApiModelProperty("排序")
    private Integer sort;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("版本")
    @Version
    private Integer version;

    @ApiModelProperty("个人权限树")
    private List<PermissionTreeVo> children;

}
